package suncertify.gui;

/**
 * Enumeration of actions triggered by the user interface. The enumerations are usually assigned to user interface
 * components to identify the type of action they represent.
 * 
 * <p>
 * Example: In the code below the OK and cancel JButton components in a dialog are assigned the enumeration values OK
 * and CANCEL. Later when one of the buttons is clicked the <code>actionPerformed(ActionEvent e)</code> function is
 * called, the assigned enumeration is used to distinguish between the buttons.
 * <p>
 * 
 * <pre>
 * JButton okButton = new JButton();
 * JButton cancelButton = new JButton();
 * .
 * .
 * .
 * okButton.setActionCommand(ActionCommands.OK.toString());
 * cancelButton.setActionCommand(ActionCommands.CANCEL.toString());
 * .
 * .
 * .
 * public void actionPerformed(ActionEvent e) {
 *     
 * 	if (e.getActionCommand().equalsIgnoreCase(ActionCommands.OK.toString())) {
 * 
 * 		OK button was clicked.
 * 
 * 	} else if (e.getActionCommand().equalsIgnoreCase(ActionCommands.CANCEL.toString())) {
 * 
 * 		Cancel button was clicked.
 * 	}
 * }
 * </pre>
 */
public enum ActionCommands {

    /**
     * Identifies the performed action as an OK button.
     */
    OK,

    /**
     * Identifies the performed action as a cancel button.
     */
    CANCEL,

    /**
     * Identifies the performed action as a timer event.
     */
    TIMER_SECOND,

    /**
     * Identifies the performed action as to book a selected contractor to a specific owner.
     */
    BOOK,

    /**
     * Identifies the performed action as to remove the owner from a specific contractor.
     */
    REMOVE_BOOKING,

    /**
     * Identifies the performed action to show the open file dialog.
     */
    OPEN_FILE,

    /**
     * Identifies the performed action to connect to the application server.
     */
    CONNECT_TO_SERVER,

    /**
     * Identifies the performed action to start the application's server.
     */
    START_SERVER,

    /**
     * Identifies the performed action to stop the application's server.
     */
    STOP_SERVER,

    /**
     * Identifies the performed action to terminate the application's server.
     */
    TERMINATE_SERVER
}
